﻿@{
    string action = (string)ViewContext.Controller.ValueProvider.GetValue("action").RawValue;
    string controller = (string)ViewContext.Controller.ValueProvider.GetValue("controller").RawValue;
}
<!DOCTYPE html>
<head>
    <link href="http://www.100pies.net/Gifs/Transporte-Terrestre/Autobus/autobus-13.gif" rel="icon" />
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
    <!-- Latest compiled and minified JavaScript -->
    <link href="~/Content/Site.css" rel="stylesheet" />
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
    <!-- JQuery Core 2.1.1 -->
    <script src="//code.jquery.com/jquery-2.1.1.min.js"></script>

    <meta name="viewport" content="width=device-width" />

    <title>@ViewBag.Title</title>
</head>

<body background="http://wallpoper.com/images/00/44/41/11/bus-station_00444111.jpg">

    <nav class="navbar navbar-inverse" role="navigation">
    </nav>

    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">

        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <span class="navbar-brand">Lo Pibe Tours 22k</span>
            </div>

            <div class="collapse navbar-collapse"> 
                <ul class="nav navbar-nav">

                    <li @if ((action == "Index")&&(controller == "Account"))  
                        { <text>class="active"</text> }><a href="@Url.Action("Index", "Account")">Usuarios Registrados</a></li>

                    @if (!WebSecurity.IsAuthenticated)
                    {
                        <li @if (action == "Login")  
                            { <text>class="active"</text> }><a href="@Url.Action("Login", "Account")">Iniciar Sesion</a></li>
                    }
                    else
                    {
                        <li @if (controller == "Consultas")
                            { <text>class="active"</text> }><a href="@Url.Action("index", "Consultas")">Realizar Consutas</a></li>
                        <li><a href="@Url.Action("Logout", "Account")">Cerrar Sesion @WebSecurity.CurrentUserName</a></li>
                    }

                </ul>
            </div>

        </div>
    </div>

    <div class="container cuadro" style="background-color:white">
        <div class="site-template">
            @RenderBody()
        </div>
    </div>

</body>
